
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure
-- --------------------------------------------------
-- Date Created: 05/07/2013 17:04:06
-- Generated from EDMX file: C:\Users\Matteo\Documents\Visual Studio 2012\Projects\Tutorials\DataFeedService\Data\EDM\Trading.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [TRADING];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------


-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[SymbolSet]', 'U') IS NOT NULL
    DROP TABLE [dbo].[SymbolSet];
GO

-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table 'SymbolSet'
CREATE TABLE [dbo].[SymbolSet] (
    [ID] bigint IDENTITY(1,1) NOT NULL,
    [Ask] decimal(18,0)  NOT NULL,
    [Bid] decimal(18,0)  NOT NULL,
    [Code] nvarchar(max)  NOT NULL,
    [Digits] smallint  NOT NULL,
    [PipSize] decimal(18,0)  NOT NULL,
    [PointSize] decimal(18,0)  NOT NULL,
    [Spread] decimal(18,0)  NOT NULL,
    [Timestamp] datetime  NOT NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [ID] in table 'SymbolSet'
ALTER TABLE [dbo].[SymbolSet]
ADD CONSTRAINT [PK_SymbolSet]
    PRIMARY KEY CLUSTERED ([ID] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------